{% extends "admin/base_site.html" %}
{% load i18n admin_modify adminmedia %}
{% load url from future %}

{% block branding %}
<h1 id="site-name">{% trans 'Khawajgan Census Reports' %}</h1>
{% endblock %}
        
{% block breadcrumbs %}
<div class="breadcrumbs">
     <a href="../">{% trans "Home" %}</a>     
</div>
{% endblock %}

{% block content %}

	<h1> Khawajgan Census Report</h1>
	
	<TABLE>
		<TR>
			<TH align="left">Male </TH>
			<TH align="left">Female </TH> 
			<TH align="left">Male(Under 18) </TH>
			<TH align="left">Female(Under 18) </TH>
			<TH align="left">Total </TH>		
		</TR>
		<TR>
			<TD>{{men_count}}</TD>
			<TD>{{women_count}}</TD> 
			<TD>{{boys.count}}</TD>
			<TD>{{girls.count}}</TD>
			<TD>{{total}}</TD>
		</TR>
	</TABLE>
	
	<TABLE>
		<CAPTION><b>Adult Male</b></CAPTION>
		<TR>
			<TH align="left">#</TH>
			<TH align="left">Name</TH> 
			<TH align="left">Kabilah</TH>		
		</TR>
		{% for man in men %}
			<TR>
				<TD>{{forloop.counter}}</TD>
				<TD>{{man.name}}</TD> 
				<TD>{{man.caste}}</TD>
			</TR>
		{% endfor %}
	</TABLE>
	
	<TABLE>
		<CAPTION><b>Adult Male(dependent)</b></CAPTION>
		<TR>
			<TH align="left">#</TH>
			<TH align="left">Name</TH> 
			<TH align="left">Kabilah</TH>		
		</TR>
		{% for man in men_dep %}
			<TR>
				<TD>{{forloop.counter}}</TD>
				<TD>{{man.name}}</TD> 
				<TD>{{man.caste}}</TD>
			</TR>
		{% endfor %}
	</TABLE>
	
	<TABLE>
		<CAPTION><b>Adult Female</b></CAPTION>
		<TR>
			<TH align="left">#</TH>
			<TH align="left">Name</TH> 
			<TH align="left">Kabilah</TH>		
		</TR>
		{% for woman in women %}
			<TR>
				<TD>{{forloop.counter}}</TD>
				<TD>{{woman.name}}</TD> 
				<TD>{{woman.caste}}</TD>
			</TR>
		{% endfor %}
	</TABLE>
	
	<TABLE>
		<CAPTION><b>Adult Female(dependent)</b></CAPTION>
		<TR>
			<TH align="left">#</TH>
			<TH align="left">Name</TH> 
			<TH align="left">Kabilah</TH>		
		</TR>
		{% for woman in women_dep %}
			<TR>
				<TD>{{forloop.counter}}</TD>
				<TD>{{woman.name}}</TD> 
				<TD>{{woman.guardian.caste}}</TD>
			</TR>
		{% endfor %}
	</TABLE>
	
	<TABLE>
		<CAPTION><b>Male(under 18)</b></CAPTION>
		<TR>
			<TH align="left">#</TH>
			<TH align="left">Name</TH>
			<TH align="left">Kabilah</TH>
		</TR>
		{% for boy in boys %}
			<TR>
				<TD>{{forloop.counter}}</TD>
				<TD>{{boy.name}}</TD> 
				<TD>{{boy.guardian.caste}}</TD>
			</TR>
		{% endfor %}
	</TABLE>
	
	<TABLE>
		<CAPTION><b>Female(under 18)</b></CAPTION>
		<TR>
			<TH align="left">#</TH>
			<TH align="left">Name</TH>
			<TH align="left">Kabilah</TH>
		</TR>
		{% for girl in girls %}
			<TR>
				<TD>{{forloop.counter}}</TD>
				<TD>{{girl.name}}</TD> 
				<TD>{{girl.guardian.caste}}</TD>
			</TR>
		{% endfor %}
	</TABLE>
{% endblock %}